
#include "Attack.h"

#include "Character.h"
#include "Player.h"
#include "PlayerStats.h"
#include "Monster.h"
#include "MonsterStats.h"
#include <iostream>

using namespace std;

int main()
{
	PlayerStats pStats(100, 100, 100, 100, 100, 1000, 0, 500, 100);
	Player p("tom the barbarian", WARRIOR, pStats);
	
	Monster m(5);
	m.setDead(false);
	
	Attack a;
	
	while( true )
	{
	
		// player attacks the monster
		cout << "monster hitpoints before attack = " << m.getMonsterStats().getHitPoints() << endl;
		a.attack(p, m, 0);
		cout << "monster hitpoints after attack = " << m.getMonsterStats().getHitPoints() << endl;
	
		if( m.isDead() )
		{
			cout << "monster died!" << endl; 
			break;
		}
		
		
		// monster attacks the player
		cout << "player hitpoints before = " << p.getPlayerStats().getHitPoints() << endl;
		a.attack(m, p);
		cout << "player hitpoints after = " << p.getPlayerStats().getHitPoints() << endl;		
		
		if( p.isDead() )
		{
			cout << "player died!" << endl; 
			break;
		}		
	}	
	
	return 0;
}